<extend name="Public/base"/>
<block name="body">
    <div class="main-title">
        <h2>{$title}</h2>
    </div>
    <div ng-controller="ProCtrl"  ng-init='init({$classifyarr},{$fruitclassifyarr},{$pnamearr},{$bandarr})'>
    <form action="{:U()}" id="proform" method="post" enctype="multipart/form-data" class="form-horizontal">
        <div class="form-item">
            <label class="item-label">货别</label>
            <div class="controls">
                <select  ng-change="caselect(c)" class="text" ng-model="c" required/>
                <option ng-repeat="ca in cas" value="{{($index)}}">
                    {{ca.classify}}
                </option>
                </select>
                <input type="hidden" class="text input-large" name="classify" value="{{classify}}" required />
                <input type="hidden" class="text input-large" name="classify_no" value="{{classify_no}}" required />
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">水果分类</label>
            <div class="controls">
                <select  ng-change="faselect(f)" class="text" ng-model="f">
                    <option ng-repeat="fa in fas" value="{{($index)}}">
                        {{fa.fruit_classify}}
                    </option>
                </select>
                <input type="hidden" class="text input-large"  name="fruit_classify" value="{{fruit_classify}}" required/>
                <input type="hidden" class="text input-large" name="fruit_classify_no" value="{{fruit_classify_no}}" required/>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label" >水果名</label>
            <div class="controls">
                <select class="text" id="pname-select" ng-change="apaselect(p)" ng-model="p">
                    <option ng-repeat="apa in apas" value="{{($index)}}">{{apa.pname}}</option>
                </select>
                <input type="hidden" class="text input-large" name="pname" value="{{pname}}" required/>
                <input type="hidden" class="text input-large" name="pname_no" value="{{pname_no}}" required/>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">规格<span class="text-danger small">(例子：1箱/单位，20斤/箱，2个/装)</span></label>
            <div class="controls">
                <input type="text" class="text" name="spec" value=""  required/>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">规格编号<span class="text-danger small">(2位数字)</span></label>
            <div class="controls">
                <input type="text" class="text" name="spec_no" value=""  required/>
            </div>
        </div>
        <br/>
        <div class="form-item">
            <button class="btn submit-btn ajax-post"  id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);
                    return false;">返 回</button>
        </div>
    </form>
    </div>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('Material/productmanage')}');
        $('select').select2();
    </script>
</block>
